//
//  struct_test.swift
//  cnswift-demo
//
//  Created by YangWei on 2020/12/18.
//  Copyright © 2020 YangWei. All rights reserved.
//

import UIKit

struct Card {
    var rank: Rank
    var suit: Suit
    func simpleDescription() -> String {
        return "The \(rank.simpleDescription()) of \(suit.simpleDescription())"
    }
    /**
     实验
     给 Card 添加一个方法来创建一整副扑克牌，并且把每张牌的 rank 和 suit 对应起来。
     */
    func creatPoker() -> Array<Any> {
        // TODO: 遍历枚举 完成
        return []
    }
}

class struct_test: NSObject {
    func structUseTest() {
        let threeOfSpades = Card(rank: .three, suit: .spades)
        let threeOfSpadesDescription = threeOfSpades.simpleDescription()
        print(threeOfSpadesDescription)
    }
}
